<template>
  <div>
    <h6 class="mb10">外贸型企业历史退税数据(24个月数据)</h6>
    <BaseTable :columns="columns" v-bind="table"></BaseTable>
  </div>
</template>

<script>
import BaseTable from '@/components/BaseTable/index.vue'
import { FormTableMixin } from '@/mixins/form-table'
import http from '@/utils/request'
async function service(params) {
  if (!this.$route.query.isFromEnterprise) {
    const { records, total } = await http.get('/risk/drawback_info', {
      params: { uscCode: this.$route.query.uscCode, ...params },
    })

    return {
      data: records,
      total: total,
    }
  }
}

export default {
  name: 'TaxRebatesData',
  components: {
    BaseTable,
  },
  mixins: [FormTableMixin(service)],
  data() {
    return {
      columns: [
        { label: '年月', prop: 'declarationYear' },
        { label: '申报出口销售(美元)', prop: 'declarationSalesUsa' },
        { label: '申报出口销售(人民币)', prop: 'declarationSales' },
        { label: '退税计税金额', prop: 'drawbackExciseTax' },
        { label: '申报退税额', prop: 'approvedRebeatTax' },
        { label: '申报免抵额', prop: 'approvedExemptTax' },
        { label: '核准退税额', prop: 'vat' },
        { label: '核准免抵额', prop: 'vatExemptTax' },
        { label: '办理退税额', prop: 'manageRefundTax' },
        { label: '办理免抵额', prop: 'manageExemptTax' },
      ],
    }
  },
}
</script>

<style lang="scss" scoped></style>
